package com.wl.mr.group;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class ordGroupingComparator extends WritableComparator {

    public ordGroupingComparator() {
        super(GroupBean.class,true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        GroupBean o1 = (GroupBean) a;
        GroupBean o2 = (GroupBean) b;
        int res = o1.getOrderId().compareTo(o2.getOrderId());
        return res;
    }
}
